# Copyright (c) 2025 Li Auto Inc. and its affiliates
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

TOPDIR:=
BUILD_SYSTEM := $(TOPDIR)build/make

ifeq ($V,1)
hide:=
else
hide:=@
endif

all:

include $(BUILD_SYSTEM)/envsetup.mk
include $(BUILD_SYSTEM)/definitions.mk
include tools/Makefile
include $(TARGET_PRODUCT_DIR)/plat.mk

# Library List
include mvbs/build.mk

# Application
-include app/Makefile
-include examples/Makefile


all:$(all_executable_modules)


install:$(all_executable_modules_install)


sdk: $(all_sdk_modules_install)


compile_commands.json: FORCE
	@echo "GEN	compile_commands.json"
	$(hide)./build/tools/gen_compile_commands.py -t $@ -d out

clean:
	-rm -rf $(OUT_DIR)

manifest-save: FORCE
	-repo manifest -r -o $(OUT_DIR)/manifest.xml

# For Debug
p-%: FORCE
	@echo $*=$($*)

.PHONY: all clean install manifest-save FORCE
